<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="gov.trasport.online.plugin.social.fb.FBConnection"%>
<%
	FBConnection fbConnection = new FBConnection();
%>
<html>

<head>
<title>Welcome to Employee Track Portal || Index</title>
<link rel="shortcut icon" href="images/employees.png" draggable="false">
<script type="text/javascript"
	src="<%=request.getContextPath()%>/js/extFormvalidation.js"></script>
<script type="text/javascript" src="js/security/securityAsserts.js"></script>
<script>
window.fbAsyncInit = function() {
  FB.init({
    appId      : '671158103013258', // App ID
    channelUrl : 'localhost',
    status     : true, // check login status
    cookie     : true, // enable cookies to allow the server to access the session
    xfbml      : true  // parse XFBML
  });
  };

(function(d){
   var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
   if (d.getElementById(id)) {return;}
   js = d.createElement('script'); js.id = id; js.async = true;
   js.src = "//connect.facebook.net/en_US/all.js";
   ref.parentNode.insertBefore(js, ref);
 }(document));
 
function Logout()
{
	alert('logout');
    FB.logout(function(){document.location.reload();});
 
}
</script>

<style type="text/css">
div.menu3 {
	/*width:500px;margin:0 auto;*/
	/*Uncomment this line to make the menu center-aligned.*/
	text-align: center;
	font-size: 0;
	height: 25px;
	*position: relative;
	*top: 1px; /*Hacks for IE6 & IE7 */
}

div.menu3 a {
	display: inline-block;
	padding: 0 20px;
	margin-right: 1px; /* It specifies the distance between each tab */
	background: #F7F7F7;
	color: Black;
	text-decoration: none;
	font: normal 12px Arial;
	line-height: 24px;
	border: 1px solid #CAD0DB;
	border-bottom: 0;
	color: #666;
	vertical-align: top; /*ChangeSet#2*/
	text-decoration: none;
}

div.menu3 a:hover, div.menu3 a.current {
	background: #E9ECF0;
	line-height: 25px;
	color: #000;
}

div.menu3sub {
	height: 6px;
	border: 1px solid #CAD0DB;
	background: #E9ECF0;
}
</style>
</head>
<body>

	<c:if test="${!empty sessionScope.first_name}">
	  <div align="right" style="margin-top: 5px;"> welcome to ${sessionScope.first_name} ${sessionScope.last_name} [ ${sessionScope.email}] 
	  	<a href="<%=request.getContextPath()%>/logout">Logout</a></div>
	  	<a href="" onclick="Logout();">facebook Logout</a></div>
		  
	</c:if>
	
	<c:if test="${empty sessionScope.first_name}">
	  <div align="right" style="margin-top: 5px;">
		<b>Existing User? <a href="loginGateway.cgi" onclick="fun()">Login</a></b>
		 <a href="<%=fbConnection.getFBAuthUrl()%>"> <img
			style="margin-top: 8px;" src="./images/facebookloginbutton.png"  height="30px" width="132px"/>
			
		</a>
		
	</div>
	</c:if>
	
	
	<jsp:include page="menuHeader.jsp"></jsp:include>
	<br>
	<b>Welcome to Employee Track Portal</b>
	<a href="employee_asserts.jsp">CLICK Here</a>
	<%=request.getContextPath()%>

	<jsp:include page="footer.jsp"></jsp:include>
</body>
</html>